package cn.zymall.common.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;

@Data
@EqualsAndHashCode(callSuper=true)
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "seckill_sku")
public class SeckillSku extends BaseEntity implements Serializable {
    /**
     * 规格编号
     */
    @TableId(value = "SKU_ID", type = IdType.AUTO)
    private Integer skuId;

    /**
     * 规格名称
     */
    @TableField(value = "SKU_NAME")
    private String skuName;

    /**
     * 规格库存
     */
    @TableField(value = "SUM")
    private Integer sum;

    /**
     * 商品规格
     */
    @TableField(value = "SKU_ATTR")
    private String skuAttr;

    /**
     * 单价
     */
    @TableField(value = "PRICE")
    private Double price;

    /**
     * 规格图片
     */
    @TableField(value = "SKU_IMG")
    private String skuImg;

    /**
     * 商品编号
     */
    @TableField(value = "SPU_ID")
    private Integer spuId;

    /**
     * 状态（0禁用，1启用）
     */
    @TableField(value = "SKU_STATUS")
    private Byte skuStatus;

    /**
     * 创建时间
     */
    @TableField(value = "SKU_CREATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    private Date skuCreateTime;

    /**
     * 创建人
     */
    @TableField(value = "CREATE_BY")
    private Integer createBy;

    /**
     * 更新人
     */
    @TableField(value = "UPDATE_BY")
    private Integer updateBy;

    /**
     * 更新时间
     */
    @TableField(value = "UPDATE_TIME")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",
            timezone = "GMT+8")
    private Date updateTime;

    private static final long serialVersionUID = 1L;

    public static final String COL_SKU_ID = "SKU_ID";

    public static final String COL_SKU_NAME = "SKU_NAME";

    public static final String COL_SUM = "SUM";

    public static final String COL_SKU_ATTR = "SKU_ATTR";

    public static final String COL_PRICE = "PRICE";

    public static final String COL_SKU_IMG = "SKU_IMG";

    public static final String COL_SPU_ID = "SPU_ID";

    public static final String COL_SKU_STATUS = "SKU_STATUS";

    public static final String COL_SKU_CREATE_TIME = "SKU_CREATE_TIME";

    public static final String COL_CREATE_BY = "CREATE_BY";

    public static final String COL_UPDATE_BY = "UPDATE_BY";

    public static final String COL_UPDATE_TIME = "UPDATE_TIME";
}
